package com.qf.ps;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 *  发布、订阅模式的  消费者  的监听器
 * @author lixu
 */
@Component
public class PsQueue {


    /**
     * 监听队列1
     */
    @RabbitListener(queues = "ps_queue1")
    public void receiverPsQueue1(String msg){

        System.out.println("=====消费者1=：" + msg);

    }
    /**
     * 监听队列2
     */
    @RabbitListener(queues = "ps_queue2")
    public void receiverPsQueue2(String msg){

        System.out.println("=====消费者2=：" + msg);

    }
}
